import request from '@/utils/request'



const api_name='/admin/product/productSpec'


// 查询所有的产品规格数据
export const FindAllProductSpec = () => {
    return request({
      url: `${api_name}/findAll`,
      method: 'get',
    })
  }
/**
 * 分页查询
 * @param {} page 
 * @param {*} limit 
 * @returns 
 */
export const GetProductSpecPageList=(page,limit)=>{

    return request({
        url:`${api_name}/${page}/${limit}`,
        method:'get',
    })
}

/**
 * 规格新增
 * @param {} data 
 * @returns 
 */
export const SaveProductSpec=data=>{

    return request({
        url:`${api_name}/save`,
        method:'post',
        data
    })
}

/**
 * 修改规格
 * @param {*} data 
 * @returns 
 */
export const UpdateProductSpecById=data=>{

    return request({
        url:`${api_name}/updateById`,
        method:'put',
        data
    })
}

/**
 * 删除规格
 * @param {*} id 
 * @returns 
 */
export const DeleteProductSpecById=id=>{

    return request({
        url:`${api_name}/deleteById/${id}`,
        method:'delete',
    
    })
}
